home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
docdem.zip
/
SAMPPROG.RC
< prev
Wrap
Text File
|
1991-04-09
|
4KB
|
115 lines
;*************************************************
;* *
;* Turbo Pascal for Windows *
;* Demo resource compiler script *
;* Copyright (c) 1991 by Borland International *
;* *
;*************************************************
; SAMPPROG.RC --a sample resource script file
; --this script illustrates the use of icons, strings,
; menus, and dialog resources in Windows
; --this script would be compiled with the resource
; compiler and then appended to the pascal program
; using the $R compiler directive
; include C-style header files for constant definitions:
#include <windows.h>
#include <wobjects.h>
#include <sampprog.h>
; define icons in separate files
SampleIcon ICON sample.ico
; strings can be defined numerically or symbolically
STRINGTABLE
BEGIN
ids_NoProgrm, "Program unavailable"
ids_Invalid, "Invalid entry"
ids_Fatal, "Fatal error!"
; .
; . other strings go here
; .
END
; Menus define commands for the user
SampleMenu MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "&New..\tCtrl+N", cm_FileNew
MENUITEM "&Open..\tCtrl+O", cm_FileOpen
MENUITEM "&Save..\tCtrk+S", cm_FileSave
MENUITEM SEPARATOR
MENUITEM "&Print \tCtrl+P", cm_FilePrint
END
POPUP "&Edit"
BEGIN
MENUITEM "&Undo \tAlt+BkSp", cm_EditUndo
MENUITEM SEPARATOR
MENUITEM "&Cut \tShift+Del", cm_EditCut
MENUITEM "C&opy \tIns", cm_EditCopy
MENUITEM "&Paste \tShift+Ins", cm_EditPaste
MENUITEM "&Delete \tDel", cm_EditDelete
MENUITEM "C&lear All \tCtrl+Del", cm_EditClear
END
POPUP "&View"
BEGIN
MENUITEM "Summary \tF2", cm_ViewSummary
MENUITEM "Graph \tF3", cm_ViewGraph
END
END
; Accelerators provide "hot keys" to menus, commands
SampleAccelerators ACCELERATORS
BEGIN
"^n", cm_FileNew
"^o", cm_FileOpen
"^s", cm_FileSave
"^p", cm_FilePrint
VK_DELETE, cm_EditCut, VIRTKEY, SHIFT
VK_INSERT, cm_EditCopy, VIRTKEY
VK_INSERT, cm_EditPaste, VIRTKEY, SHIFT
VK_DELETE, cm_EditDelete, VIRTKEY
VK_DELETE, cm_EditClear, VIRTKEY, CONTROL
VK_BACK, cm_EditUndo, VIRTKEY, ALT
VK_F2, cm_ViewSummary, VIRTKEY
VK_F3, cm_ViewGraph, VIRTKEY
END
; Dialog boxes display information to the user
AboutBox DIALOG 20, 20, 160, 80
CAPTION "About SAMPPROG"
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"
BEGIN
CTEXT "Sample Program" -1, 0, 10, 160, 10
CTEXT "Written in Turbo Pascal" -1, 0, 26, 160, 10
CTEXT "for Windows 3.0" -1, 0, 36, 160, 10
ICON "Sample_Icon" -1, 8, 8, 0, 0
DEFPUSHBUTTON "OK", IDOK, 60, 56, 40, 14
END
FileOpen DIALOG 20, 20, 204, 124
CAPTION "File Open"
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"
BEGIN
LTEXT "File&name:", -1, 6, 8, 36, 10
EDITTEXT 100, 42, 6, 98, 12, ES_AUTOHSCROLL
LTEXT "Directory:", -1, 6, 20, 36, 10
LTEXT "" 101, 42, 20, 98, 10
LTEXT "&Files:", -1, 6, 32, 64, 10
LISTBOX 102, 6, 44, 64, 82, WS_TABSTOP | WS_VSCROLL | LBS_SORT
LTEXT "&Directories:", -1, 76, 32, 64, 10
LISTBOX 103, 76, 44, 64, 82, WS_TABSTOP | WS_VSCROLL | LBS_SORT
DEFPUSHBUTTON "OK", IDOK, 146, 6, 50, 14
PUSHBUTTON "Cancel", IDCANCEL, 146, 24, 50, 14
END